<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>示例2</title>
</head>
<body>
    <script>
        const str = "1309"
        console.log(str.padStart(6,'0'))
    </script>
</body>
</html>